home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8364 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: macro that return value, how?
  5. Date: 01 Mar 1996 16:17:59 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Mar1091759@qcd.lanl.gov>
  8. References: <3133e87b.868433@news.csus.edu> <3136FA60.350B@cmt.lpr.mail.carel.fi>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: Ari Lukumies's message of Fri, 01 Mar 1996 15:23:44 +0200
  13.  
  14. In article <3136FA60.350B@cmt.lpr.mail.carel.fi>
  15. Ari Lukumies <aril@cmt.lpr.mail.carel.fi> writes:
  16.  
  17. <snip>
  18. AL: This will compile:
  19. AL: 
  20. AL:     #define    add1(x)    (x += VAR)
  21. AL: 
  22. AL: Remember, the result of an assignment is implicitly returned. So,
  23. you can use  
  24. AL: constructs like:
  25. <snip>
  26. AL: and
  27. AL:     if (add1(2) == 2)
  28. AL:         DoSomething...
  29.  
  30. Did you try this?
  31.  
  32. Cheers
  33. Tanmoy
  34. --
  35. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  36. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  37. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  38. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  39. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  40. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  41.